package com.cinema.Bean;

public class Movie implements java.io.Serializable {
	private String movieId; // 影片id
	private String movieName; // 导演名字
	private String starring; // 主演名字
	private String detail; // 详情
	private int duration; // 时长
	private String director; // 导演
	private String language; // 语言
	private String movieType; // 电影类型
	private String slogan; // 台词标语
	private String poster; // 海报
	private String manActorPic;// 男主演图片
	private String womanActorPic; // 女主演图片
	private String releaseTime; // 上映时间
	private int movieStat;// 电影状态
	
	public String getMovieId() {
		return movieId;
	}

	public void setMovieId(String movieId) {
		this.movieId = movieId;
	}

	public String getMovieName() {
		return movieName;
	}

	public void setMovieName(String movieName) {
		this.movieName = movieName;
	}

	public String getStarring() {
		return starring;
	}

	public void setStarring(String starring) {
		this.starring = starring;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public int getDuration() {
		return duration;
	}

	public void setDuration(int duration) {
		this.duration = duration;
	}

	public String getDirector() {
		return director;
	}

	public void setDirector(String director) {
		this.director = director;
	}

	public String getLanguage() {
		return language;
	}

	public void setLanguage(String language) {
		this.language = language;
	}

	public String getMovieType() {
		return movieType;
	}

	public void setMovieType(String movieType) {
		this.movieType = movieType;
	}

	public String getSlogan() {
		return slogan;
	}

	public void setSlogan(String slogan) {
		this.slogan = slogan;
	}

	public String getPoster() {
		return poster;
	}

	public void setPoster(String poster) {
		this.poster = poster;
	}

	public String getManActorPic() {
		return manActorPic;
	}

	public void setManActorPic(String manActorPic) {
		this.manActorPic = manActorPic;
	}

	public String getWomanActorPic() {
		return womanActorPic;
	}

	public void setWomanActorPic(String womanActorPic) {
		this.womanActorPic = womanActorPic;
	}

	public String getReleaseTime() {
		return releaseTime;
	}

	public void setReleaseTime(String releaseTime) {
		this.releaseTime = releaseTime;
	}
	
	public int getMovieStat() {
		return movieStat;
	}

	public void setMovieStat(int movieStat) {
		this.movieStat = movieStat;
	}
	
	public boolean equals(Object obj) {
		if (obj == null)// 非空性
			return false;
		if (obj == this)
			return false;// 自反性
		if (obj instanceof Movie) {
			// 向下转型
			Movie u = (Movie) obj;
			// 利用数据库的规则，主键相等，即数据相等
			return u.movieId.equals(this.movieId);
		}
		return false;
	}
	
	public Movie(String movieId, String movieName, String starring, String detail, int duration, String director,
			String language, String movieType, String slogan, String poster, String manActorPic, String womanActorPic,
			String releaseTime, int movieStat) {
		super();
		this.movieId = movieId;
		this.movieName = movieName;
		this.starring = starring;
		this.detail = detail;
		this.duration = duration;
		this.director = director;
		this.language = language;
		this.movieType = movieType;
		this.slogan = slogan;
		this.poster = poster;
		this.manActorPic = manActorPic;
		this.womanActorPic = womanActorPic;
		this.releaseTime = releaseTime;
		this.movieStat = movieStat;
	}
	
	@Override
	public String toString() {
		return "Movie [movieId=" + movieId + ", movieName=" + movieName + ", starring=" + starring + ", detail="
				+ detail + ", duration=" + duration + ", director=" + director + ", language=" + language
				+ ", movieType=" + movieType + ", slogan=" + slogan + ", poster=" + poster + ", manActorPic="
				+ manActorPic + ", womanActorPic=" + womanActorPic + ", releaseTime=" + releaseTime + ", movieStat="
				+ movieStat + "]";
	}

	public Movie() {
		super();
	}
	
	
	public int hashCode() {
		return this.movieId.hashCode();// 返回主键的hashCode
	}
	
}
